<%@ page language="java" pageEncoding="UTF-8"%>
<%@taglib prefix="s" uri="/struts-tags"%>

<div class="navbar navbar-inverse">
	<div class="navbar-header">
		<button class="navbar-toggle" data-toggle="collapse"
			data-target=".navbar-responsive-collapse">
			<span class="sr-only">Toggle navigation</span> <span class="icon-bar"></span>
			<span class="icon-bar"></span> <span class="icon-bar"></span>
		</button>
		<span class="navbar-brand"><span
			class="glyphicon glyphicon-home"></span> 欢迎 <a class="userName"
			href="index.do" title="返回主页">${user.userName }</a>! </span>
	</div>
	<div class="collapse navbar-collapse navbar-responsive-collapse">
		<ul class="nav navbar-nav navbar-right">
			<s:if test='user.role eq "未分配"'>
				<li><a>未被分配角色</a></li>
			</s:if>
			<!-- 管理员能够使用 -->
			<s:if test='user.role eq "系统管理员"'>
				<li class="dropdown"><a href="#" class="dropdown-toggle"
					data-toggle="dropdown">员工管理<b class="caret"></b></a>
					<ul class="dropdown-menu">
						<li><a href="employeeList.do">员工列表<span
								class="glyphicon glyphicon-search"></span></a></li>
						<li><a href="addEmployee.do">新增员工<span
								class="glyphicon glyphicon-plus"></span></a></li>
						<li><a href="addSysAdmin.do">新增管理员<span
								class="glyphicon glyphicon-plus"></span></a></li>
						<li><a href="modifyEmployee.do">修改员工信息<span
								class="glyphicon glyphicon-cog"></span></a></li>
						<li><a href="deleteEmployee.do">删除员工<span
								class="glyphicon glyphicon-trash"></span></a></li>
						<li><a href="giveroleEmployee.do">分配员工角色<span
								class="glyphicon glyphicon-leaf"></span></a></li>
					</ul></li>
				<li class="dropdown"><a href="#" class="dropdown-toggle"
					data-toggle="dropdown">角色管理<b class="caret"></b></a>
					<ul class="dropdown-menu">
						<li><a href="roleList.do">角色列表<span
								class="glyphicon glyphicon-search"></span></a></li>
						<li><a href="addRole.do">新增角色<span
								class="glyphicon glyphicon-plus"></span></a></li>
					</ul></li>
			</s:if>
			<li class="dropdown"><a href="#" class="dropdown-toggle"
				data-toggle="dropdown">项目信息管理<b class="caret"></b></a>
				<ul class="dropdown-menu">
					<li><a href="projectList.do">项目列表<span
							class="glyphicon glyphicon-search"></span></a></li>
					<s:if test='user.role eq "系统管理员"'>
						<li><a href="addProject.do">新建项目<span
							class="glyphicon glyphicon-plus"></span></a></li>
					</s:if>
					<s:if test='user.role eq "项目经理"'>
						<li><a href="addProjectPlayers.do">添加项目成员<span
							class="glyphicon glyphicon-leaf"></span></a></li>
					</s:if>
				</ul></li>
			<li class="dropdown"><a href="#" class="dropdown-toggle"
				data-toggle="dropdown">问题管理<b class="caret"></b></a>
				<ul class="dropdown-menu">
					<li><a href="problemList.do">问题列表<span
						class="glyphicon glyphicon-search"></span></a></li>
					<s:if test='user.role eq "项目经理"'>
						<li><a href="problemList.do">问题统计<span
							class="glyphicon glyphicon-stats"></span></a></li>
					</s:if>
				</ul></li>
			<li class="dropdown"><a href="#" class="dropdown-toggle"
				data-toggle="dropdown">操作<b class="caret"></b></a>
				<ul class="dropdown-menu">
					<li><a href="index.do">返回主页
						<span class="glyphicon glyphicon-home right"></span></a></li>
					<s:if test="user.loginType != 0">
					<li><a href="personalInfo.do">个人信息
						<span class="glyphicon glyphicon-user right"></span></a></li>
					<li><a href="updateInfo.do">修改信息
						<span class="glyphicon glyphicon-cog"></span></a></li>
					</s:if>
					<li><a href="updatePwd.do">修改密码
						<span class="glyphicon glyphicon-lock"></span></a></li>
					<li class="divider"></li>
					<li><a href="logout.do">退出登录<span
							class="glyphicon glyphicon-log-out"></span></a></li>
				</ul></li>
		</ul>
	</div>
</div>